package com.frcdi.qms.system.domain;

import com.frcdi.qms.common.annotation.Excel;
import com.frcdi.qms.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 用户审计追踪表 sys_user_oper_log
 *
 * @author cell
 * @date 2023-08-01
 */
public class SysUserOperLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 模块名称 */
    @Excel(name = "模块名称")
    private String modelName;

    /** 表名 */
    @Excel(name = "菜单名称")
    private String tableName;

    /** 业务类型（0其它 1新增 2修改 3删除..） */
    @Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退")
    private Integer type;

    /** 操作人员ID */
    @Excel(name = "操作人员ID")
    private String operId;

    /** 操作人员名称 */
    @Excel(name = "操作人员名称")
    private String operName;

    /** 操作人员部门名称 */
    @Excel(name = "操作人员部门名称")
    private String deptName;

    /** 操作前内容 */
    @Excel(name = "操作前内容")
    private String operBefore;

    /** 操作前内容 */
    @Excel(name = "操作后内容")
    private String operAfter;

    /** 操作人登录ip */
    @Excel(name = "操作人登录ip")
    private String operIp;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date operTime;

    /** 操作角色 */
    @Excel(name = "操作角色")
    private String operRoles;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setModelName(String modelName)
    {
        this.modelName = modelName;
    }

    public String getModelName()
    {
        return modelName;
    }
    public void setTableName(String tableName)
    {
        this.tableName = tableName;
    }

    public String getTableName()
    {
        return tableName;
    }
    public void setType(Integer type)
    {
        this.type = type;
    }

    public Integer getType()
    {
        return type;
    }
    public void setOperId(String operId)
    {
        this.operId = operId;
    }

    public String getOperId()
    {
        return operId;
    }
    public void setOperName(String operName)
    {
        this.operName = operName;
    }

    public String getOperName()
    {
        return operName;
    }
    public void setDeptName(String deptName)
    {
        this.deptName = deptName;
    }

    public String getDeptName()
    {
        return deptName;
    }
    public void setOperBefore(String operBefore)
    {
        this.operBefore = operBefore;
    }

    public String getOperBefore()
    {
        return operBefore;
    }
    public void setOperAfter(String operAfter)
    {
        this.operAfter = operAfter;
    }

    public String getOperAfter()
    {
        return operAfter;
    }
    public void setOperIp(String operIp)
    {
        this.operIp = operIp;
    }

    public String getOperIp()
    {
        return operIp;
    }
    public void setOperTime(Date operTime)
    {
        this.operTime = operTime;
    }

    public Date getOperTime()
    {
        return operTime;
    }

    public String getOperRoles() {
        return operRoles;
    }

    public void setOperRoles(String operRoles) {
        this.operRoles = operRoles;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("modelName", getModelName())
                .append("tableName", getTableName())
                .append("type", getType())
                .append("operId", getOperId())
                .append("operName", getOperName())
                .append("deptName", getDeptName())
                .append("operBefore", getOperBefore())
                .append("operAfter", getOperAfter())
                .append("operIp", getOperIp())
                .append("operTime", getOperTime())
                .append("operRoles", getOperRoles())
                .toString();
    }
}

